//
//  MyTrainingCell.m
//  HuiKaoClient
//
//  Created by 龚 杰 on 13-3-1.
//  Copyright (c) 2013年 龚 杰. All rights reserved.
//

#import "MyTrainingCell.h"
#import <QuartzCore/QuartzCore.h>

@implementation MyTrainingCell
@synthesize trname = m_trname;
@synthesize traddress = m_traddress;
@synthesize trmoney = m_trmoney;
@synthesize trstime = m_trstime;
@synthesize trteacher = m_trteacher;
@synthesize trtime = m_trtime;
@synthesize trpayment = m_trpayment;


- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        UIView* bview = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, 140)];
        [bview setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"firm_list_bg.png"]]];

        m_trname  = [[UILabel alloc] initWithFrame:CGRectMake(15,7,300,20)];
        m_trname.backgroundColor = [UIColor clearColor];
        m_trname.font = [UIFont boldSystemFontOfSize:14.0f];
        m_trname.textColor = [UIColor colorWithRed:38/255.0f green:38/255.0f blue:38/255.0f alpha:1.0f];
        [bview addSubview:m_trname];
        
        m_trtime  = [[UILabel alloc] initWithFrame:CGRectMake(15,38,150,20)];
        m_trtime.backgroundColor = [UIColor clearColor];
        m_trtime.font = [UIFont boldSystemFontOfSize:12.0f];
        m_trtime.textColor = [UIColor colorWithRed:38/255.0f green:38/255.0f blue:38/255.0f alpha:1.0f];
        [bview addSubview:m_trtime];
        
        m_trteacher = [[UILabel alloc] initWithFrame:CGRectMake(15,70,150,20)];
        m_trteacher.backgroundColor = [UIColor clearColor];
        m_trteacher.font = [UIFont boldSystemFontOfSize:12.0f];
        m_trteacher.textColor = [UIColor colorWithRed:38/255.0f green:38/255.0f blue:38/255.0f alpha:1.0f];
        [bview addSubview:m_trteacher];

        m_traddress = [[UILabel alloc] initWithFrame:CGRectMake(167,38,200,20)];
        m_traddress.backgroundColor = [UIColor clearColor];
        m_traddress.font = [UIFont boldSystemFontOfSize:12.0f];
        m_traddress.textColor = [UIColor colorWithRed:38/255.0f green:38/255.0f blue:38/255.0f alpha:1.0f];
        [bview addSubview:m_traddress];

        m_trstime = [[UILabel alloc] initWithFrame:CGRectMake(167,70,200,20)];
        m_trstime.backgroundColor = [UIColor clearColor];
        m_trstime.font = [UIFont boldSystemFontOfSize:12.0f];
        m_trstime.textColor = [UIColor colorWithRed:38/255.0f green:38/255.0f blue:38/255.0f alpha:1.0f];
        [bview addSubview:m_trstime];

        m_trmoney = [[UILabel alloc] initWithFrame:CGRectMake(15,105,200,20)];
        m_trmoney.backgroundColor = [UIColor clearColor];
        m_trmoney.font = [UIFont boldSystemFontOfSize:16.0f];
        m_trmoney.textColor = [UIColor colorWithRed:237/255.0f green:135/255.0f blue:10/255.0f alpha:1.0f];
        [bview addSubview:m_trmoney];
        
        m_trpayment = [UIButton buttonWithType:UIButtonTypeCustom];
        m_trpayment.frame = CGRectMake(250, 102, 60, 25);

        
        [bview addSubview:m_trpayment];
        [self.contentView addSubview:bview];
        [bview release];
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)dealloc{
    [m_trname release];
    [m_trtime release];
    [m_trteacher release];
    [m_traddress release];
    [m_trstime release];
    [m_trmoney release];
    m_trpayment = nil;
    [super dealloc];
}
@end
